import { BrowserModule } from '@angular/platform-browser';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';

import { AppComponent } from './app.component';
import { UserComponent } from './components/UserComponent/app.usercomponent';
import { NotFoundComponent } from './components/NotFound/NotFound';
import { NzDemoFormCoordinatedComponent } from './components/Form/app.Form';

import { NzDemoCardBasicComponent } from './components/UserComponent/child/app.child';

import { HttpClientModule } from '@angular/common/http';
import { httpInterceptorProviders } from './utils/index';

// import { ActiveTitleService } from './services/active-title.service';

import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';

import { LoginGuard } from './route/login.guard';
import { UnsaveGuard } from './route/logout.guard';

import { ROUTES } from './route/router';

@NgModule({
  declarations: [
    AppComponent,
    UserComponent,
    NotFoundComponent,
    NzDemoCardBasicComponent,
    NzDemoFormCoordinatedComponent
  ],
  imports: [
    BrowserModule,
    RouterModule.forRoot(ROUTES),
    NgZorroAntdModule,
    HttpClientModule,
    FormsModule,
    ReactiveFormsModule,
    BrowserAnimationsModule
  ],
  providers: [
    LoginGuard,
    UnsaveGuard,
    // ActiveTitleService,
    { provide: NZ_I18N, useValue: zh_CN },
    httpInterceptorProviders
  ],
  bootstrap: [AppComponent],
  schemas: [
    CUSTOM_ELEMENTS_SCHEMA
  ],
})
export class AppModule { }
